<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>

</head>

<body>
  <div id="change-password" class="modal-dialog x-modal-dialog" style="width:600px; margin-top: 150px;">
    <div class="modal-content">
      <div class="modal-header x-breadcrumb clearfix">
        <h2><i class="glyphicon glyphicon-fire"></i>&nbsp;&nbsp;<span>修改密码</span></h2>
      </div>
      <form class="form-horizontal" method="POST" action="${ctx.host}/profile/change-password" data-validate="true">
        <input type="hidden" name="_method" value="PATCH">
        
        <div class="modal-body">
          <p class="confirm">
            <i class="glyphicon glyphicon-flash glyphicon-position-fix-2"></i>&nbsp;&nbsp;密码已过期，请修改密码！
          </p>
        
          <div class="form-group">
            <label class="control-label col-xs-4">输入新密码：</label>
            <div class="col-xs-6 control-label">
              <input id="password" name="password" type="password" class="form-control" data-validate="required" >
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-xs-4">确认新密码：</label>
            <div class="col-xs-6 control-label">
              <input id="confirmNewPassword" name="confirmNewPassword" type="password" class="form-control" data-validate="required|password_validate">
            </div>
          </div>
        </div>

        <div class="modal-footer clearfix">
          <button type="submit" class="btn btn-success btn-shadow btn-shadow-success x-btn">确定</button>&nbsp;&nbsp;&nbsp;&nbsp;
        </div>
      </form>
    </div>
  </div>
  
  <%@ include file="/WEB-INF/include/script.jsp"%>
  
  <d:resource root="${ctx.resource}/build" type="script" src="js/page/system/profile/change-password-needed.js">
    <script type="text/javascript">
      require(['page/system/profile/change-password-needed'], function(page) {
        page.init();
      })
    </script>
  </d:resource>
</body>